<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
    <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>     
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>ADG-Add User</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style2 {font-size: 52px; color: #333333; font-family: "Monotype Corsiva";}
#Layer1 {
	position:absolute;
	width:430px;
	height:29px;
	z-index:1;
	left: 177px;
	top: 95px;
}
.style4 {font-size: 22px; color: #333333; font-family: "Monotype Corsiva"; }
#Layer2 {
	position:absolute;
	width:124px;
	height:159px;
	z-index:1;
	left: 0px;
	top: 236px;
}
.style7 {font-size: 14px; color: #333333; }
.style8 {font-size: 26px}
#Layer3 {
	position:absolute;
	width:109px;
	height:32px;
	z-index:2;
	left: 41px;
	top: 130px;
}
.style9 {
	font-size: 25px;
	font-family: "Times New Roman", Times, serif;
	color: #000000;
}
#Layer4 {
	position:absolute;
	width:128px;
	height:34px;
	z-index:3;
	left: 1202px;
	top: 126px;
}
.style10 {font-size: 20px; font-family: "Times New Roman", Times, serif; color: #000000; }
#Layer5 {
	position:absolute;
	width:763px;
	height:34px;
	z-index:2;
	left: 41px;
	top: 131px;
}
#Layer6 {
	position:absolute;
	text-align:center;
	width:50%;
	height:156px;
	z-index:4;
	left: 25%;
	top: 200px;
}
body {
	font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
	font-size: .8em;
	}
 
/* the div that holds the date picker calendar */
.dpDiv {
	}
 
 
/* the table (within the div) that holds the date picker calendar */
.dpTable {
	font-family: Tahoma, Arial, Helvetica, sans-serif;
	font-size: 12px;
	text-align: center;
	color: #505050;
	background-color: #ece9d8;
	border: 1px solid #AAAAAA;
	}
 
 
/* a table row that holds date numbers (either blank or 1-31) */
.dpTR {
	}
 
 
/* the top table row that holds the month, year, and forward/backward buttons */
.dpTitleTR {
	}
 
 
/* the second table row, that holds the names of days of the week (Mo, Tu, We, etc.) */
.dpDayTR {
	}
 
 
/* the bottom table row, that has the "This Month" and "Close" buttons */
.dpTodayButtonTR {
	}
 
 
/* a table cell that holds a date number (either blank or 1-31) */
.dpTD {
	border: 1px solid #ece9d8;
	}
 
 
/* a table cell that holds a highlighted day (usually either today's date or the current date field value) */
.dpDayHighlightTD {
	background-color: #CCCCCC;
	border: 1px solid #AAAAAA;
	}
 
 
/* the date number table cell that the mouse pointer is currently over (you can use contrasting colors to make it apparent which cell is being hovered over) */
.dpTDHover {
	background-color: #aca998;
	border: 1px solid #888888;
	cursor: pointer;
	color: red;
	}
 
 
/* the table cell that holds the name of the month and the year */
.dpTitleTD {
	}
 
 
/* a table cell that holds one of the forward/backward buttons */
.dpButtonTD {
	}
 
 
/* the table cell that holds the "This Month" or "Close" button at the bottom */
.dpTodayButtonTD {
	}
 
 
/* a table cell that holds the names of days of the week (Mo, Tu, We, etc.) */
.dpDayTD {
	background-color: #CCCCCC;
	border: 1px solid #AAAAAA;
	color: white;
	}
 
 
/* additional style information for the text that indicates the month and year */
.dpTitleText {
	font-size: 12px;
	color: gray;
	font-weight: bold;
	}
 
 
/* additional style information for the cell that holds a highlighted day (usually either today's date or the current date field value) */ 
.dpDayHighlight {
	color: 4060ff;
	font-weight: bold;
	}
 
 
/* the forward/backward buttons at the top */
.dpButton {
	font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: gray;
	background: #d8e8ff;
	font-weight: bold;
	padding: 0px;
	}
 
 
/* the "This Month" and "Close" buttons at the bottom */
.dpTodayButton {
	font-family: Verdana, Tahoma, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: gray;
	background: #d8e8ff;
	font-weight: bold;
	}
.style1 {color: #000000;font-size: 16px;
	font-family: Georgia, "Times New Roman", Times, serif;
}
#Layer7 {
	position:absolute;
	width:586px;
	height:115px;
	z-index:5;
	left: 263px;
	top: 249px;
}
.msgstyle {color: red;font-size: 22px;
	font-family: Georgia, "Times New Roman", Times, serif;}
#msgLayer {
	position:absolute;
	text-align:center;
	width:50%;
	height:56px;
	z-index:4;
	left: 25%;
	top: 150px;
}
-->
</style>
<jsp:include page="../scripts/datepicker.jsp" />
<jsp:include page="../scripts/validationscript.jsp" />
<Script Language="JavaScript">  
function setcancel()
{
	document.getElementById("form2").submit();
	
}
</Script>
</head>
<body>
<jsp:include page="head.jsp" />

  <form id="form1"  name="appfrm" method="post" action="adg.do?method=saveuser" onSubmit="return validate()">
    <%
String un="",fn="",ln="",a1="",a2="",a3="",p="",m="",ut="",e="",l="",v=""; 
  String f=(String)request.getAttribute("flag");
  if(f=="1")
  {
	  
	 	un=(String)request.getAttribute("un");
		fn=(String)request.getAttribute("fn");
		ln=(String)request.getAttribute("ln");
		a1=(String)request.getAttribute("a1");
		a2=(String)request.getAttribute("a2");
		a3=(String)request.getAttribute("a3");
		p=(String)request.getAttribute("p");
		m=(String)request.getAttribute("m");
		ut=(String)request.getAttribute("ut");
		e=(String)request.getAttribute("e");
		l=(String)request.getAttribute("l");
		v=(String)request.getAttribute("v");
		%>
		 <div align="center" id="msgLayer" class="msgstyle"><u><font color="red">user name exists </font></u></div>
<%
  }
  
%>
<div align="center" id="Layer6">
  <table width="482" border="0" align="center" cellpadding="2" cellspacing="3">
   <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">User Name : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="username" value="<%=un%>"/>*   
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">First Name : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="fname" value="<%=fn%>"/>*  
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">Last Name : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="lname" value="<%=ln%>"/>*    
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">Address Line 1 : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="add1" value="<%=a1%>"/>*    
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">Address Line 2 : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="add2" value="<%=a2%>"/>    
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">Address Line 3 : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="add3" value="<%=a3%>"/>    
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">Phone No : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="phno" value="<%=p%>"/>*    
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">Mobile : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="mob" value="<%=m%>"/>*    
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">User Title : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="usertitle" value="<%=ut%>"/>*    
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">Education : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="edu" value="<%=e%>"/>*    
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">License : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="license" value="<%=l%>"/>*    
    </div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" class="style1"><div align="right">Valid Upto : </div></td>
    <td bgcolor="#FFFFFF">      <div align="left">
      <input type="text" name="validupto" id="validupto" value="<%=v%>"/>*<IMG src="images/cal.gif" height=18 width=18 border=0 alt="Calendar" onClick="javascript:displayDatePicker('validupto',this);">    
    </div></td>
  </tr>
</table>

<p>&nbsp;</p>
 
  <div align="center">
  
       <input type="submit" name="Submit" value="Submit" class="button"/>
        <input type="button" name="cancel" value="cancel" class="button" onClick="setcancel()" />
  </div>
  </form> 
 
 <form id="form2"  name="form2" method="post" action="adg.do?method=mainpage">
  </form>
   <p>&nbsp;</p>
   
   
</div>


<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

<form id="linkform" name="linkform" method="post" action="">
 
</form>
</body>
</html>